From b2f9a907cef414a1bc0d1c64f910b3cf4736dd07 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 22 Oct 2021 20:45:27 +0200 Subject: [PATCH] tiff: Fix variable assignment --- gdk/loaders/gdktiff.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gdk/loaders/gdktiff.c b/gdk/loaders/gdktiff.c index 2652aeacc4..62e292a73d 100644 --- a/gdk/loaders/gdktiff.c +++ b/gdk/loaders/gdktiff.c @@ -393,10 +393,11 @@ gdk_load_tiff (GBytes *input_bytes, guint16 extra; guint16 *extra_types; - if (!TIFFGetField (tif, TIFFTAG_EXTRASAMPLES, &extra, &extra_types)) + if (TIFFGetField (tif, TIFFTAG_EXTRASAMPLES, &extra, &extra_types)) + alpha_samples = extra_types[0]; + else alpha_samples = 0; - alpha_samples = extra_types[0]; if (alpha_samples != 0 && alpha_samples != EXTRASAMPLE_ASSOCALPHA && alpha_samples != EXTRASAMPLE_UNASSALPHA) { texture = load_fallback (tif, error); -- 2.30.2